package Test1224;

public class Test07 {
    public static void main(String[] args) {
        // 求出arr中元素的平均值
        int[] arr = {6, 1, 7, 4, 3};
          int sum = 0;
          double a =0;
        for (int i = 0; i < arr.length; i++) {
          sum +=arr[i];
          a= (double) sum/(double) arr.length;



        }System.out.println(sum);
    }
}
